import request from '@/utils/request.js'

// 获取用户信息
export const getUserInfo = (uid) => {
  return request({
    method: 'GET',
    url: `/user/detail?uid=${uid}`
    // 简写:
    // uid
  })
}

// 请求我喜欢音乐列表
export const getLikeToList = (id) => {
  return request({
    method: 'GET',
    url: '/likelist',
    id
    // params: {
    //   uid
    // }
    // 简写:
  })
}

// 获取用户歌单
export const getPlaylist = (params) => {
  return request({
    method: 'GET',
    url: `/user/playlist`,
    params
    // 简写:
    // uid
  })
}

// 获取歌单详情
export const getSonglistDetails = (params) => {
  // const timestamp = +new Date()
  return request({
    method: 'GET',
    url: `/playlist/detail`,
    params
  })
}

// 创建歌单
export const getNewList = (params) => {
  // const timestamp = +new Date()
  return request({
    method: 'GET',
    url: `/playlist/create`,
    params
  })
}
